from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt

from . import views
from . import staff_views
from . import student_views
from . import classroom_views
from . import class_views
from . import admin_views

urlpatterns = [
    url(r'^(log-out/)?$', csrf_exempt(views.index)),
    url(r'^js/javascript_language\.js$', csrf_exempt(views.javascript_language)),

    url(r'^log/(?:([0-9]+)/)?$', csrf_exempt(admin_views.log_overview)),
    url(r'^day-overview/(?:([0-9]+)/)?$', csrf_exempt(admin_views.day_overview)),
    url(r'^teaching-hours-overview/(?:([0-9]+)/)?$', csrf_exempt(admin_views.teaching_hours_overview)),
    url(r'^lesson-overview/([0-9]+)/(?:([0-9]+)/)?$', csrf_exempt(admin_views.lesson_overview)),
	
    url(r'^staff-overview/$', csrf_exempt(staff_views.staff_overview)),
    url(r'^staff-info/([0-9]+)/$', csrf_exempt(staff_views.staff_info)),
    url(r'^staff-schedule/([0-9]+)/(?:([0-9]+)/)?$', csrf_exempt(staff_views.staff_schedule)),
    url(r'^staff-edit/([0-9]+)/$', csrf_exempt(staff_views.staff_edit)),
	
    url(r'^student-overview/$', csrf_exempt(student_views.student_overview)),
    url(r'^student-schedule/([0-9]+)/(?:([0-9]+)/)?$', csrf_exempt(student_views.student_schedule)),
    url(r'^student-edit/([0-9]+)/$', csrf_exempt(student_views.student_edit)),
    url(r'^student-view/([0-9]+)/$', csrf_exempt(student_views.student_view)),
	
    url(r'^classroom-overview/$', csrf_exempt(classroom_views.classroom_overview)),
    url(r'^classroom-schedule/([0-9]+)/(?:([0-9]+)/)?$', csrf_exempt(classroom_views.classroom_schedule)),
    url(r'^classroom-edit/([0-9]+)/$', csrf_exempt(classroom_views.classroom_edit)),
	
    url(r'^class-overview/$', csrf_exempt(class_views.class_overview)),
    url(r'^class-schedule/([0-9]+)/(?:([0-9]+)/)?$', csrf_exempt(class_views.class_schedule)),
    url(r'^class-edit/([0-9]+)/$', csrf_exempt(class_views.class_edit)),
    url(r'^class-view/([0-9]+)/$', csrf_exempt(class_views.class_view)),

    url(r'^teacher-default-availability/([0-9]+)/$', csrf_exempt(views.teacher_default_availability)),
	]